package com.atguigu.paymentdemo.service.impl;

import com.atguigu.paymentdemo.entity.Product;
import com.atguigu.paymentdemo.mapper.ProductMapper;
import com.atguigu.paymentdemo.service.ProductService;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> implements ProductService {

    @Transactional(rollbackFor = Exception.class)
    @Override
    public void test() {
        Product product = new Product();
//        product.setTitle("1");
        this.baseMapper.insert(product);
        int i = 1/0;
    }
}
